﻿<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d d1"
	xmlns:d1="http://schemas.microsoft.com/expression/blend/2006"
    xmlns:music="clr-namespace:WickedSick.ClientComponents.Music;assembly=WickedSick.ClientComponents.Music"
    xmlns:local="clr-namespace:SDB"
	x:Class="SDB.Window1"
	x:Name="Window" MinWidth="800" MinHeight="700"
	Title="Window1" HorizontalContentAlignment="Left" VerticalContentAlignment="Top"
    Background="{DynamicResource BackgroundVisualBrush}">
    <Grid>
        <Grid x:Name="LayoutRoot" ClipToBounds="False" Grid.IsSharedSizeScope="False">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="247"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="135"/>
                <RowDefinition/>
                <RowDefinition Height="125"/>
            </Grid.RowDefinitions>
            <Border Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,58,0,0" Width="201" Height="25" BorderBrush="{DynamicResource CobaltBlue}" BorderThickness="1" Background="{DynamicResource SlightBlue}">
                <Label HorizontalAlignment="Center" Style="{StaticResource ShadowedTextBlock}" FontFamily="Segoe" FontSize="16" Foreground="#FFDCE1EA">Current Playlist</Label>
            </Border>
            <Border Margin="10,83,36,0" Grid.Row="1" BorderBrush="{DynamicResource CobaltBlue}" BorderThickness="1, 0, 1, 1">
                <local:PlaylistListBox x:Name="lstPlaylist" ListBoxItem.MouseDoubleClick="lstPlaylist_MouseDoubleClick" Drop="lstPlaylist_Drop" AllowDrop="True" ItemContainerStyle="{StaticResource PlaylistItemStyle}" FontFamily="Segoe" FontSize="14" BorderThickness="0">
                    <local:PlaylistListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="{Binding Path=ParentArtist.Name}" Padding="2"/>
                                <Label Padding="2"> - </Label>
                                <Label Content="{Binding Path=Title}" Padding="2"/>
                            </StackPanel>
                        </DataTemplate>
                    </local:PlaylistListBox.ItemTemplate>
                </local:PlaylistListBox>
            </Border>
            
            <ListBox Name="TabHeaderListBox" Padding="0" Margin="0,27,32,14" Grid.Column="1" 
                     Background="{DynamicResource CobaltBlue}" Style="{DynamicResource HorizontalListBox}"
                     HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                <ListBox.Items>
                    <local:TabHeader IsHitTestVisible="False" TabHeaderImage="images\0112.ico" TabHeaderText="Home"/>
                    <local:TabHeader IsHitTestVisible="False" TabHeaderImage="images\0004.ico" TabHeaderText="Library"/>
                    <local:TabHeader IsHitTestVisible="False" TabHeaderImage="images\0004.ico" TabHeaderText="Archive"/>
                    <local:TabHeader IsHitTestVisible="False" TabHeaderImage="images\0119.ico" TabHeaderText="Playlists"/>
                    <local:TabHeader IsHitTestVisible="False" TabHeaderImage="images\preferences.png" TabHeaderText="Preferences"/>
                </ListBox.Items>
            </ListBox>

            <TabControl Padding="0" Name="PageTabs" Margin="0, 13, 32, 0" Grid.Row="1" Grid.Column="1" 
                        SelectedIndex="{Binding ElementName=TabHeaderListBox, Path=SelectedIndex}" 
                        BorderThickness="0" ItemContainerStyle="{DynamicResource HideTabHeader}">
                <TabItem Name="Home">Home</TabItem>
                <TabItem Name="Library">
                    <TreeView x:Name="SongTree" BorderThickness="0" Padding="8" Background="#FF576C8B"
                      SnapsToDevicePixels="True" HorizontalContentAlignment="Stretch" ScrollViewer.VerticalScrollBarVisibility="Hidden" 
                      ItemContainerStyleSelector="{StaticResource SongItemStyleSelector}" MouseMove="SongTree_MouseMove"/>
                </TabItem>
                <TabItem Name="Archive">Archive</TabItem>
                <TabItem Name="Playlists">Playlists</TabItem>
                <TabItem Name="Preferences">
                	<Grid Background="#FFC9C9C9">
                		<StackPanel HorizontalAlignment="Left" Margin="15,15,0,0" VerticalAlignment="Top">
                			<Label Width="200" Content="Maximum Local Storage" FontFamily="Segoe UI" FontSize="14" FontWeight="Bold" FontStyle="Normal"/>
                			<Slider Name="sldMaxLocalAmount"  Maximum="4096" LargeChange="512" SmallChange="128" Value="1024"/>
                			<Label Content="{Binding ElementName=sldMaxLocalAmount, Path=Value, Converter={StaticResource mediaConverter}, ConverterParameter=SizeInMb}" FontFamily="Segoe" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                		</StackPanel>
                	</Grid>
                </TabItem>
            </TabControl>
            
            <Border Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Margin="200,40,200,40" HorizontalAlignment="Center">
                <StackPanel Orientation="Horizontal">
                    <local:SongPlayer x:Name="SDB_Player" />
                </StackPanel>
            </Border>
        </Grid>
        
        <Grid>
            <Image IsHitTestVisible="False" Height="205" Width="170" HorizontalAlignment="Left" VerticalAlignment="Top" Source="images\squirrel.png" x:Name="Squirrel"/>
            <Image IsHitTestVisible="False" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="191" Height="191" Margin="80,0,-18,-18" Source="images\note-oval.png" />
            <Image IsHitTestVisible="False" HorizontalAlignment="Left" Margin="220, 177, 0, 173" Width="51" Stretch="Fill" Source="images\note-middle.png"/>
            <Image IsHitTestVisible="False" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="220, 97, 0, 0" Width="51" Height="80" Source="images\note-mid-left-angle.png"/>
            <Image IsHitTestVisible="False" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="220, 57, 0, 0" Width="51" Height="40" Stretch="Fill" Source="images\note-middle.png"/>
            <Image IsHitTestVisible="False" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="220, 0, 0, 0" Width="51" Height="57" Source="images\note-top-left-angle.png"/>

            <Image IsHitTestVisible="False" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="271, 120, 65, 0" Height="57" Stretch="Fill" StretchDirection="Both" Source="images\note-horizontal.png"/>
            <Image IsHitTestVisible="False" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="271, 0, 56, 0" Height="57" Stretch="Fill" StretchDirection="Both" Source="images\note-top-horizontal.png"/>

            <Image IsHitTestVisible="False" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="191" Height="191" Margin="0,0,-18,-18" Source="images\note-oval.png"/>
            <Image IsHitTestVisible="False" HorizontalAlignment="Right" Margin="0, 177, -18, 173" Width="51" Stretch="Fill" Source="images\note-middle.png"/>
            <Image IsHitTestVisible="False" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0, 97, -18, 0" Width="83" Height="80" Source="images\note-mid-right-angle.png"/>
            <Image IsHitTestVisible="False" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0, 57, -18, 0" Width="51" Height="40" Stretch="Fill" Source="images\note-middle.png"/>
            <Image IsHitTestVisible="False" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0, 0, -18, 0" Width="74" Height="57" Source="images\note-top-right-angle.png"/>

            <TextBox Margin="240, 128, 0, 0" Grid.Row="1" Grid.Column="1" FontFamily="Segoe" FontSize="14" Foreground="#99000000" VerticalAlignment="Top" HorizontalAlignment="Left" Width="200" Text="Search">
                <TextBox.BitmapEffect>
                    <DropShadowBitmapEffect ShadowDepth="2"/>
                </TextBox.BitmapEffect>
            </TextBox>
        </Grid>
    </Grid>
</Window>